# $Id$
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=libgusb
pkgver=0.2.11
pkgrel=1
pkgdesc='GObject wrapper for libusb1'
url='https://github.com/hughsie/libgusb'
arch=('i686' 'x86_64')
license=('LGPL2.1')
depends=('glib2' 'glibc' 'libusb')
makedepends=('git' 'gobject-introspection' 'gtk-doc' 'python2' 'vala')
_commit='732b49b528cc69bf4c8999e088835ecab9d5c05c'
source=("git+https://github.com/hughsie/libgusb#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd libgusb

  git describe --tags | sed 's/^gusb_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd libgusb

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd libgusb

  ./configure \
    --prefix='/usr' \
    --enable-gtk-doc \
    --disable-static
  make
}

package() {
  cd libgusb

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
